size = int(input("请输入三角形长度"))
print("靠左上：")
i=0
while i<=size:
    print("*"*i)
    i+=1
print("靠右上：")
i = 0
while i<=size:
    print(" "*(size-i)+"*"*i)
    i += 1
print("靠右下：")
i = 0
while i<=size:
    print(" "*i+"*"*(size-i))
    i+=1
print("靠左下：")
i = 0
while i<=size:
    print("*"*(size-i)+" "*i)
    i += 1